package com.kymatrix.kycarbon.xsmd.system.server.outer;

import com.kymatrix.kycarbon.xsmd.system.api.service.TenantApi;
import com.kymatrix.kycarbon.xsmd.system.server.service.ITenantService;
import java.util.List;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 多租户的 API 接口
 *
 * 
 */
@Component
@Slf4j
public class TenantApiImpl implements TenantApi {

    @Resource
    private ITenantService tenantService;

    @Override
    public List<String> getTenantIdList() {
        log.info("getTenantIdList...");
        return null;
    }

    @Override
    public boolean validateTenant(String id) {
        log.info("validateTenant id={}", id);
        return tenantService.getById(id) != null;
    }
    
}
